/**
 * Copyright (C), 2015-2020, XXX有限公司
 * FileName: JsonResult
 * Author:   zmjha
 * Date:     2020/8/2 19:57
 * Description: layui返回数据格式
 * History:
 * <author>          <time>          <version>          <desc>
 * 作者姓名           修改时间           版本号              描述
 */
package com.zmj.utils;

/**
 * 〈一句话功能简述〉<br> 
 * 〈layui返回数据格式〉
 *
 * @author zmjha
 * @create 2020/8/2
 * @since 1.0.0
 */
public class JsonResult {

    private int code; // 0：成功，其它异常
    private String msg;
    private long count; //表中总记录数
    private Object data; // 返回前端的数据

    public JsonResult() {
    }

    public JsonResult(int code, Object data) {
        this.code = code;
        this.data = data;
    }

    public JsonResult(int code, String msg, long count, Object data) {
        this.code = code;
        this.msg = msg;
        this.count = count;
        this.data = data;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public long getCount() {
        return count;
    }

    public void setCount(long count) {
        this.count = count;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }
}